.class public Lcom/netease/newsreader/view/HeadAdvertismentGallery;
.super Landroid/widget/FrameLayout;
.source "HeadAdvertismentGallery.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemSelectedListener;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/widget/FrameLayout;",
        "Landroid/widget/AdapterView$OnItemSelectedListener;"
    }
.end annotation


# instance fields
.field private mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

.field private mGallery:Lcom/netease/newsreader/view/MyGallery;

.field private mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

.field private mTag:Landroid/widget/TextView;

.field private mTitle:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 49
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 50
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 45
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 46
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    .line 41
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 42
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/view/HeadAdvertismentGallery;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 112
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->updateTag(I)V

    return-void
.end method

.method private updateTag(I)V
    .locals 8
    .parameter "position"

    .prologue
    const v7, 0x7f0200f7

    const/4 v6, 0x0

    const/16 v5, 0x8

    .line 113
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    if-eqz v3, :cond_0

    if-ltz p1, :cond_0

    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v3}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getRealCount()I

    move-result v3

    if-le p1, v3, :cond_1

    .line 147
    :cond_0
    :goto_0
    return-void

    .line 116
    :cond_1
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v3, p1}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/Map;

    .line 117
    .local v0, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    iget-object v4, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTitle:Landroid/widget/TextView;

    const-string v3, "title"

    invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    invoke-virtual {v4, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 120
    if-nez p1, :cond_3

    .line 121
    const-string v3, "specialID"

    invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 122
    .local v1, sdocid:Ljava/lang/String;
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 123
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 124
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    const-string v4, "\u4e13\u9898"

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 125
    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v3

    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v4

    iget-object v5, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v4, v5, v7}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    goto :goto_0

    .line 127
    :cond_2
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0

    .line 130
    .end local v1           #sdocid:Ljava/lang/String;
    :cond_3
    const-string v3, "TAG"

    invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 131
    .local v2, tag:Ljava/lang/String;
    const-string v3, "special"

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_4

    .line 132
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 133
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    const-string v4, "\u4e13\u9898"

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 134
    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v3

    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v4

    iget-object v5, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v4, v5, v7}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    goto :goto_0

    .line 135
    :cond_4
    const-string v3, "photoset"

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_5

    .line 136
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 137
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    const-string v4, "\u56fe\u96c6"

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 138
    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v3

    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v4

    iget-object v5, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    const v6, 0x7f02003d

    invoke-virtual {v3, v4, v5, v6}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    goto/16 :goto_0

    .line 139
    :cond_5
    const-string v3, "doc"

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_6

    .line 140
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0

    .line 141
    :cond_6
    const-string v3, "link"

    invoke-virtual {v3, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_7

    .line 142
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0

    .line 144
    :cond_7
    iget-object v3, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v3, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto/16 :goto_0
.end method


# virtual methods
.method public getGallery()Landroid/widget/Gallery;
    .locals 1

    .prologue
    .line 65
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    return-object v0
.end method

.method protected onDetachedFromWindow()V
    .locals 3

    .prologue
    .line 197
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 198
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    if-eqz v0, :cond_0

    .line 199
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v0}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getCount()I

    move-result v0

    if-lez v0, :cond_0

    .line 200
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    iget-object v2, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/MyGallery;->getSelectedItemPosition()I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getInitPosition(I)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/MyGallery;->setSelection(I)V

    .line 203
    :cond_0
    return-void
.end method

.method protected onFinishInflate()V
    .locals 2

    .prologue
    .line 54
    invoke-super {p0}, Landroid/widget/FrameLayout;->onFinishInflate()V

    .line 55
    const v0, 0x7f0c00a3

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/view/MyGallery;

    iput-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    .line 56
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/MyGallery;->setAutoRun(I)V

    .line 57
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v0, p0}, Lcom/netease/newsreader/view/MyGallery;->setOnItemSelectedListener(Landroid/widget/AdapterView$OnItemSelectedListener;)V

    .line 59
    const v0, 0x7f0c00a6

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/view/AdvDotIndicator;

    iput-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

    .line 60
    const v0, 0x7f0c00a7

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTitle:Landroid/widget/TextView;

    .line 61
    const v0, 0x7f0c00a5

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    .line 62
    return-void
.end method

.method public onItemSelected(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 9
    .parameter
    .parameter "arg1"
    .parameter "position"
    .parameter "arg3"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 82
    .local p1, adapter:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v6}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getRealCount()I

    move-result v0

    .line 83
    .local v0, count:I
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v6, p3}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getRealPosition(I)I

    move-result v3

    .line 84
    .local v3, realPosition:I
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

    invoke-virtual {v6}, Lcom/netease/newsreader/view/AdvDotIndicator;->getTotalItems()I

    move-result v6

    if-eq v6, v0, :cond_0

    .line 85
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

    invoke-virtual {v6, v0}, Lcom/netease/newsreader/view/AdvDotIndicator;->setTotalItems(I)V

    .line 87
    :cond_0
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

    invoke-virtual {v6, v3}, Lcom/netease/newsreader/view/AdvDotIndicator;->setCurrentItem(I)V

    .line 89
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 91
    if-lez v3, :cond_1

    .line 92
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v6, v3}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 93
    .local v1, map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v6, "TAG"

    invoke-interface {v1, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    .line 94
    .local v4, tag:Ljava/lang/String;
    if-eqz v4, :cond_1

    const-string v6, "doc"

    invoke-virtual {v6, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 95
    const-string v6, "url"

    invoke-interface {v1, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    .line 96
    .local v5, url:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->getContext()Landroid/content/Context;

    move-result-object v6

    const-string v7, "ads"

    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v6, v7, v8}, Lcom/netease/mobileanalysis/MobileAgent;->setEvent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 102
    .end local v1           #map:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .end local v4           #tag:Ljava/lang/String;
    .end local v5           #url:Ljava/lang/String;
    :cond_1
    new-instance v2, Lcom/netease/newsreader/view/HeadAdvertismentGallery$1;

    invoke-direct {v2, p0, v3}, Lcom/netease/newsreader/view/HeadAdvertismentGallery$1;-><init>(Lcom/netease/newsreader/view/HeadAdvertismentGallery;I)V

    .line 108
    .local v2, r:Ljava/lang/Runnable;
    iget-object v6, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v6, v2}, Lcom/netease/newsreader/view/MyGallery;->setXXXRunnalbe(Ljava/lang/Runnable;)V

    .line 110
    return-void
.end method

.method public onNothingSelected(Landroid/widget/AdapterView;)V
    .locals 0
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;)V"
        }
    .end annotation

    .prologue
    .line 151
    .local p1, arg0:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    return-void
.end method

.method protected onWindowVisibilityChanged(I)V
    .locals 3
    .parameter "visibility"

    .prologue
    .line 187
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onWindowVisibilityChanged(I)V

    .line 188
    if-nez p1, :cond_0

    invoke-virtual {p0}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->isShown()Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    if-eqz v0, :cond_1

    .line 189
    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    invoke-virtual {v0}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getCount()I

    move-result v0

    if-lez v0, :cond_1

    .line 190
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    iget-object v2, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v2}, Lcom/netease/newsreader/view/MyGallery;->getSelectedItemPosition()I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getInitPosition(I)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/MyGallery;->setSelection(I)V

    .line 193
    :cond_1
    return-void
.end method

.method public setAdapter(Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;)V
    .locals 3
    .parameter "adapter"

    .prologue
    .line 69
    iput-object p1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    .line 70
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v0, p1}, Lcom/netease/newsreader/view/MyGallery;->setAdapter(Landroid/widget/SpinnerAdapter;)V

    .line 71
    if-eqz p1, :cond_0

    .line 72
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mAdapter:Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/netease/newsreader/adapter/HeadAdvertismentAdapter;->getInitPosition(I)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/netease/newsreader/view/MyGallery;->setSelection(I)V

    .line 74
    :cond_0
    return-void
.end method

.method public setIndicator(Landroid/content/Context;Lcom/netease/newsreader/util/ThemeSettingsHelper;)V
    .locals 3
    .parameter "context"
    .parameter "themeSettingsHelper"

    .prologue
    .line 161
    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mIndicator:Lcom/netease/newsreader/view/AdvDotIndicator;

    invoke-virtual {v1, p1, p2}, Lcom/netease/newsreader/view/AdvDotIndicator;->setIndicatorBg(Landroid/content/Context;Lcom/netease/newsreader/util/ThemeSettingsHelper;)V

    .line 163
    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getTag()Ljava/lang/Object;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 164
    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    .line 165
    .local v0, position:Ljava/lang/Integer;
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v1

    invoke-direct {p0, v1}, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->updateTag(I)V

    .line 169
    .end local v0           #position:Ljava/lang/Integer;
    :cond_0
    iget-object v1, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mTag:Landroid/widget/TextView;

    const v2, 0x7f08002d

    invoke-virtual {p2, p1, v1, v2}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 170
    return-void
.end method

.method public setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V
    .locals 1
    .parameter

    .prologue
    .line 77
    .local p1, listener:Landroid/widget/AdapterView$OnItemClickListener;,"Landroid/widget/AdapterView$OnItemClickListener;"
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v0, p1}, Lcom/netease/newsreader/view/MyGallery;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 78
    return-void
.end method

.method public startAutoScroll(Z)V
    .locals 1
    .parameter "autoScroll"

    .prologue
    .line 154
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    if-eqz v0, :cond_0

    .line 155
    iget-object v0, p0, Lcom/netease/newsreader/view/HeadAdvertismentGallery;->mGallery:Lcom/netease/newsreader/view/MyGallery;

    invoke-virtual {v0, p1}, Lcom/netease/newsreader/view/MyGallery;->startAutoScroll(Z)V

    .line 157
    :cond_0
    return-void
.end method
